/**
 * Copyright : www.orientpay.com , 2007-2011
 * Project : sqt_spider_main
 * $Id$
 * $Revision$
 * Last Changed by ZhouXushun at 2011-5-10 下午03:07:06
 * $URL$
 * 
 * Change Log
 * Author      Change Date    Comments
 *-------------------------------------------------------------
 * ZhouXushun     2011-5-10        Initailized
 */

package com.youthor.spider.core;

import com.youthor.spider.core.dto.HttpProxyDTO;
import com.youthor.spider.core.monitor.HttpProxyFileMonitor;
import com.youthor.spider.core.monitor.HttpProxyHolder;

/**
 * TODO Add class descriptions
 *http://hi.baidu.com/science09/blog/item/bc9c2ed22e5e32299a502764.html
 */
public class MainApp {
	public static void main(String[] args) throws Exception {
		HttpProxyFileMonitor monitor = new HttpProxyFileMonitor(5,"d:\\temp.txt");
		monitor.onStart();
		//等待完全初始化
		while(!monitor.isInit()){
			
		}
		
		System.out.println("Start SQT Spider, input help/? to get more infomation");
		HttpProxyHolder holder = HttpProxyHolder.getInstance();
		HttpProxyDTO dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		dto = holder.getHttpProxyDTO();
		System.out.println(dto.toString());
		
		while(true){
			
		}
	}
}
